package com.antball.aaa.factory_strategy;

import org.omg.PortableServer.IdUniquenessPolicy;

/**
 * @Auther: huangsj
 * @Date: 2019/8/7 14:33
 * @Description:
 */
public class DeductionFacade {


    public static void pro(){
        StrategyMan strategyMan = StrategyMan.FreeDeduction;
        deduct(strategyMan);



        strategyMan = StrategyMan.StreadyDeduction;
        deduct(strategyMan);
    }

    private static void deduct(StrategyMan strategyMan){
        IDeduction deduction = StrategyFactory.getDeduction(strategyMan);

        DeductionContext context = new DeductionContext(deduction);
        context.exec();
    }
}
